package com.situ.day5;

import org.junit.Test;

public class OOPDemo {
    @Test
    public void test1() {
        Student student1 = new Student();
        //对象.属性
        student1.id = 1;
        student1.name = "zhangsan";
        student1.age = 23;
        student1.gender = "男";
        //对象.方法
        student1.study();

        Student student2 = new Student();
        student2.id = 2;
        student2.name = "lisi";
        student2.age = 24;
        student2.gender = "男";
        student2.study();
    }

    @Test
    public void test2() {
        Student student = new Student();
        System.out.println(student.id);
        System.out.println(student.name);
        //System.out.println(student.money);
        //System.out.println(student.flag);
        //System.out.println(student.teacher);
    }

    @Test
    public void test4() {
        int[] array1 = new int[3];
        Student[] array2 = new Student[3];
        System.out.println("OOPDemo.test4");
    }

    @Test
    public void test5() {
        Student student1 = new Student();
        //对象.属性
        student1.id = 1;
        student1.name = "zhangsan";
        student1.age = 23;
        student1.gender = "男";

        String info = student1.getInfo();
        System.out.println(info);
        System.out.println(student1.getInfo());

        String str = student1.toString();
        System.out.println(str);
        System.out.println(student1.toString());
        System.out.println(student1);
    }
}
